#ifndef _SCENE_MANAGER_H_
#define _SCENE_MANAGER_H_

#include <map>
#include <vector>
#include <osg/Referenced>
#include <osg/ref_ptr>
#include <osg/Node>

class SceneManager : public osg::Referenced
{
public:
	enum ObjectType { Model, Internal };

public:
	SceneManager();

	virtual void addObject(ObjectType type, osg::Node* pNode);
	virtual void removeObject(ObjectType type, osg::Node* pNode);

	osg::Group* getRoot() { return m_rRoot.get(); }
	const osg::Group* getObjectGroup(ObjectType type) const;
	osg::Group* getObjectGroup(ObjectType type);

private:
	void createGroups();

private:
        typedef std::map< ObjectType, osg::ref_ptr<osg::Group> > TypeGroupMap;

	TypeGroupMap m_TypeGroupMap;
	osg::ref_ptr<osg::Group> m_rRoot;
};

#endif
